import request from '@/utils/request'
import Qs from 'qs'

/* 登录接口 */
export function login(data) {
  return request({
    url: '/Home/Login/login',
    method: 'post',
    data: Qs.stringify(data)
  })
}

/* 用户信息获取接口 */
export function getInfo(token) {
  return request({
    url: '/Home/My/getInfo',
    method: 'get',
    params: { token }
  })
}

/* 登出接口 */
export function logout() {
  return request({
    url: '/Home/My/logOut',
    method: 'post'
  })
}

/* 修改密码接口 */
export function changePsw(data) {
  return request({
    url: '/Home/My/savePassword',
    method: 'post',
    data: Qs.stringify(data)
  })
}
